<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var array = [];
for(var i = 0; i <3; i++) {
 array.push(() => i);               // 函数  未调用 啊 等下边调用的时候，i已经是3了。 
 // array.push(i);
}

var newArray = array.map(el => el());
console.log(newArray); // ??    
        var a = 10;
        // let d = 11
function foo() {
    console.log(a); // ??  以为会是10吧。错。因为下面有个变量啊。会提示初始化前无法访问a报错
    let a = 20;
}
foo();

    </script>
</body>
</html>